extends ../layout

block content
	.container
		.row
			.panel.panel-default.no-border
				.panel-heading.no-border
					h4 #{keyword}
				.panel-body
					if movies && movies.length > 0
						each item in movies
							.col-md-2
								.thumbnail
									a(href="/movie/#{item._id}")
										img(src="#{item.poster}", alt="#{item.title}")
									.caption
										h5.text-ov #{item.title}
										p.text-ov(style="color: orange; font-size: 12px;")
											span.glyphicon.glyphicon-star
											span.glyphicon.glyphicon-star
											span.glyphicon.glyphicon-star
											span.glyphicon.glyphicon-star-empty
											i(style="color: red; padding-left: 8px;") #{item.average}
										p.text-ov: button.btn.btn-primary.btn-xs(href="/movie/#{item._id}", role="button") 观看预告片
			ul.pagination
				- for (var i = 0; i < totalPage; i++) {
					- if (currentPage == (i + 1)) {
							li.active
								span #{currentPage}
					- }
					- else {
							li
								a(href="/results?#{query}&p=#{i}") #{i + 1}
					- }
				- }	